<%@ page contentType="text/html;charset=UTF-8" %>
<%@ include file="/WEB-INF/views/include/taglib.jsp"%>
<html>
<head>
	<title>app版本信息管理</title>
	<meta name="decorator" content="default"/>
	<script type="text/javascript">
	$(document).ready(function() {
		  $(".form_datetime").datetimepicker({ 
			  language:'zh-CN',
			  todayBtn: false,
			  autoclose: true,
			  minView: "month",
			  format: 'yyyy-mm-dd'});
		});
		function page(n,s){
			$("#pageNo").val(n);
			$("#pageSize").val(s);
			layer.load(1, {
			    shade: [0.3,'#000'] //0.1透明度的白色背景
			});
			$("#searchForm").submit();
        	return false;
        }
        <shiro:hasPermission name="basedata:appVersion:edit">
		function deleteById(id){
			layer.confirm('确认要删除该app版本信息吗？', {
				btn: ['确定','取消']
			}, function(){
				window.location.href='${ctx}/basedata/appVersion/delete?id='+id;
			}, function(){
				layer.msg('删除取消', {
					time: 2000 //2s后自动关闭
					 });
			});
        }
        </shiro:hasPermission>
	</script>
</head>
<body>
	<ul class="nav nav-tabs nav-tabss">
		<li class="active"><a href="${ctx}/basedata/appVersion/">app版本信息列表</a></li>
		<shiro:hasPermission name="basedata:appVersion:edit"><li><a href="${ctx}/basedata/appVersion/form">app版本信息添加</a></li></shiro:hasPermission>
	</ul>
	<form:form id="searchForm" modelAttribute="appVersion" action="${ctx}/basedata/appVersion/" method="post" class="breadcrumb form-search form-inline">
		<input id="pageNo" name="pageNo" type="hidden" value="${page.pageNo}"/>
		<input id="pageSize" name="pageSize" type="hidden" value="${page.pageSize}"/>
            <label>版本号：</label>
            <form:input path="version" htmlEscape="false" cssClass="form-control"/>
            
            
            
        <!--  <form:input path="onlineTime" htmlEscape="false" cssClass="form-control"/> -->   
           
           <label>上线时间：</label>
           <div class="form-group" id="data_5">
            <div class="input-daterange input-group" id="datepicker">
            	<input type="text" readonly class="input-sm form-control form_datetime" name="beginTime" id="beginTime" value="">
                <span class="input-group-addon">到</span>
                <input type="text" readonly class="input-sm form-control form_datetime" name="endTime" id="endTime" value="">
            </div>
          </div>
          
		&nbsp;<input id="btnSubmit" class="btn btn-sm btn-primary" type="submit" value="查询"/>
	</form:form>
	<tags:message content="${message}"/>
	<table id="contentTable" class="table table-striped table-bordered table-condensed">
		<thead><tr>
            <th>版本号</th>
            <th>渠道</th>
            <th>中文说明</th>
            <th>英文说明</th>
            <th>上线时间</th>
            <th>APP下载地址</th>
            <th>平台</th>
			<shiro:hasPermission name="basedata:appVersion:edit"><th>操作</th></shiro:hasPermission></tr></thead>
		<tbody>
		<c:forEach items="${page.list}" var="appVersion">
			<tr>
                <td>${appVersion.version}</td>
                <td>${appVersion.channel}</td>
                <td>${appVersion.note}</td>
                <td>${appVersion.englishNote}</td>
            <!--   <td>${appVersion.onlineTime}</td> -->  
                <td><fmt:formatDate value="${appVersion.onlineTime}"  dateStyle="medium" timeStyle="medium"  /></td>
                <td>${appVersion.packageUri}</td>
                <td>${appVersion.platform}</td>
				<shiro:hasPermission name="basedata:appVersion:edit"><td>
    				<a href="${ctx}/basedata/appVersion/form?id=${appVersion.id}">修改</a>
                    <a href="javascript:deleteById('${appVersion.id}')">删除</a>
				</td></shiro:hasPermission>
			</tr>
		</c:forEach>
		</tbody>
	</table>
	<div class="pagination">${page}</div>
</body>
</html>
